import getopt
import sys

import pytest
import os

def get_test_case():
    case = getopt.getopt(sys.argv, '-h')
    return case[1][2]
    # return 'API-全量应付流程'  # 调试用
    # return 'test_a'  # 调试用
testdir = os.path.dirname(__file__) + f'/api_flow/{get_test_case()}.py'

@pytest.fixture(scope='session', autouse=True)
def test_action():
    a = 0
    print('测试目录：'+testdir)
    assert 1 == 1
    yield a
    print('\n' + '测试结束')
